<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    
    (function(){
        // 无非就是自己调自己罢了 递归
        let arr = []
        let i = 0
        function func(){
            if(i%2==0) arr.push(i)
            if(i<=100){
                i++
                func()
            }
        }
        func()
        console.log(arr);
    })()
</script>
</html>